package com.walter.mail.configuration;

import org.noear.solon.annotation.BindProps;
import org.noear.solon.annotation.Configuration;

/**
 * 邮件发送配置属性类
 *
 * @author wuchenxi03
 * @date 2025/7/28
 */
@Configuration
@BindProps(prefix = "solon.mail")
public class MailProperties {
    /**
     * 邮件服务器SMTP主机
     */
    private String host;

    /**
     * 邮件服务器SMTP端口
     */
    private Integer port;

    /**
     * 发送邮件的用户名
     */
    private String username;

    /**
     * 发送邮件的密码或授权码
     */
    private String password;

    /**
     * 是否启用SSL连接
     */
    private Boolean ssl = false;

    /**
     * 默认编码
     */
    private String encoding = "UTF-8";

    /**
     * 默认发件人邮箱
     */
    private String from;

    public String getHost() {
        return host;
    }

    public void setHost(String host) {
        this.host = host;
    }

    public Integer getPort() {
        return port;
    }

    public void setPort(Integer port) {
        this.port = port;
    }

    public String getUsername() {
        return username;
    }

    public void setUsername(String username) {
        this.username = username;
    }

    public String getPassword() {
        return password;
    }

    public void setPassword(String password) {
        this.password = password;
    }

    public Boolean getSsl() {
        return ssl;
    }

    public void setSsl(Boolean ssl) {
        this.ssl = ssl;
    }

    public String getEncoding() {
        return encoding;
    }

    public void setEncoding(String encoding) {
        this.encoding = encoding;
    }

    public String getFrom() {
        return from;
    }

    public void setFrom(String from) {
        this.from = from;
    }
}
